package com.zxq.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.zxq.ruoyi.mapper.IotProjectProductMapper;
import com.zxq.ruoyi.domain.IotProjectProduct;
import com.zxq.ruoyi.service.IIotProjectProductService;

/**
 * 项目与产品关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-14
 */
@Service
@Primary
public class IotProjectProductServiceImpl implements IIotProjectProductService 
{
    @Autowired
    private IotProjectProductMapper iotProjectProductMapper;

    /**
     * 查询项目与产品关联
     * 
     * @param id 项目与产品关联主键
     * @return 项目与产品关联
     */
    @Override
    public IotProjectProduct selectIotProjectProductById(Long id)
    {
        return iotProjectProductMapper.selectIotProjectProductById(id);
    }

    /**
     * 查询项目与产品关联列表
     * 
     * @param iotProjectProduct 项目与产品关联
     * @return 项目与产品关联
     */
    @Override
    public List<IotProjectProduct> selectIotProjectProductList(IotProjectProduct iotProjectProduct)
    {
        return iotProjectProductMapper.selectIotProjectProductList(iotProjectProduct);
    }

    /**
     * 新增项目与产品关联
     * 
     * @param iotProjectProduct 项目与产品关联
     * @return 结果
     */
    @Override
    public int insertIotProjectProduct(IotProjectProduct iotProjectProduct)
    {
        return iotProjectProductMapper.insertIotProjectProduct(iotProjectProduct);
    }

    /**
     * 修改项目与产品关联
     * 
     * @param iotProjectProduct 项目与产品关联
     * @return 结果
     */
    @Override
    public int updateIotProjectProduct(IotProjectProduct iotProjectProduct)
    {
        return iotProjectProductMapper.updateIotProjectProduct(iotProjectProduct);
    }

    /**
     * 批量删除项目与产品关联
     * 
     * @param ids 需要删除的项目与产品关联主键
     * @return 结果
     */
    @Override
    public int deleteIotProjectProductByIds(Long[] ids)
    {
        return iotProjectProductMapper.deleteIotProjectProductByIds(ids);
    }

    /**
     * 删除项目与产品关联信息
     * 
     * @param id 项目与产品关联主键
     * @return 结果
     */
    @Override
    public int deleteIotProjectProductById(Long id)
    {
        return iotProjectProductMapper.deleteIotProjectProductById(id);
    }
}
